fix(docs): made sidebar directories scrollable, stylistic changes#1702
fix(docs): made sidebar directories scrollable, stylistic changes#1702waleedlatif1 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Greptile Overview
Summary
This PR implements UI improvements for the docs interface, focusing on sidebar scrollability and navbar alignment. The changes increase the sidebar folder's expandable height limit from 2000px to 10000px to accommodate longer directory structures, adjust the navbar search positioning with additional left padding, and reduce the search trigger width slightly for better visual balance.
Key Changes:
- Increased sidebar folder
max-hfrom 2000px to 10000px for expanded state - Added
pl-32padding to center cluster in navbar for improved alignment - Reduced search trigger width from 500px to 460px
Minor Considerations:
- The fixed
max-happroach works for most cases but may need refinement if directories exceed 10000px in the future
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- Simple styling changes focused on layout improvements with no logic modifications or breaking changes
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/docs/components/docs-layout/sidebar-components.tsx | 4/5 | Increased max-height from 2000px to 10000px to accommodate longer sidebar directories |
| apps/docs/components/navbar/navbar.tsx | 5/5 | Added left padding (pl-32) to center search trigger for better visual alignment |
| apps/docs/components/ui/search-trigger.tsx | 5/5 | Reduced search trigger width from 500px to 460px for better layout balance |
Sequence Diagram
sequenceDiagram
participant User
participant Navbar
participant SearchTrigger
participant SidebarFolder
participant DOM
User->>Navbar: Loads docs page
Navbar->>SearchTrigger: Renders centered with pl-32
SearchTrigger->>DOM: Displays 460px wide button
User->>SidebarFolder: Clicks folder toggle
SidebarFolder->>SidebarFolder: setOpen(!open)
SidebarFolder->>DOM: Animates max-h: 0 → 10000px
SidebarFolder->>DOM: Shows nested items with smooth transition
User->>SearchTrigger: Clicks search button
SearchTrigger->>DOM: Dispatches Cmd+K keyboard event
DOM->>User: Opens search modal
3 files reviewed, 1 comment
| className={cn( | ||
| 'overflow-hidden transition-all duration-200 ease-in-out', | ||
| open ? 'max-h-[2000px] opacity-100' : 'max-h-0 opacity-0' | ||
| open ? 'max-h-[10000px] opacity-100' : 'max-h-0 opacity-0' |
There was a problem hiding this comment.
style: Using a fixed max-h value for animation limits scalability. Consider using max-h-screen or implementing proper scrolling with overflow-y-auto if content exceeds 10000px.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/docs/components/docs-layout/sidebar-components.tsx
Line: 100:100
Comment:
**style:** Using a fixed `max-h` value for animation limits scalability. Consider using `max-h-screen` or implementing proper scrolling with `overflow-y-auto` if content exceeds 10000px.
How can I resolve this? If you propose a fix, please make it concise.
Summary
made sidebar directories scrollable, stylistic changes
Type of Change
Testing
Tested manually.
Checklist